home *** CD-ROM | disk | FTP | other *** search
- '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- '
- ' Global declarations for CProtect
- '
- ' ⌐ Thomas Lichtneckert 1995
- ' Nordenski÷ldsgatan 24
- ' S-413 09 G÷teborg
- ' Sweden
- ' fax: +46 - 31 121 621
- ' voice: +46 - 31 145 131
- ' email: Thomas.Lichtneckert@abc.se
- '
- ' NB comment/uncomment the proper section of
- ' funtion declarations
- '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
- Global Const FILE_NOT_FOUND = -10
- Global Const PATH_NOT_VALID = -11
- Global Const NO_PATH = -12
- Global Const NOT_REMOVABLE = -13
-
- Global Const DRIVE_OK = 0
- Global Const NO_ARGUMENTS = 1
- Global Const DRIVE_NOT_FLOPPY = 2
- Global Const DRIVE_NOT_READY = 3
- Global Const DRIVE_NOT_VALID = 4
- Global Const DRIVE_ERROR = 5
- Global Const WRONG_DISKETTE = 6
- Global Const DRIVE_WRPROT = 7
- Global Const DRIVE_WRPROT_A = 8
- Global Const DRIVE_WRPROT_B = 9
- Global Const DISK_ISIN_A = 10
- Global Const DISK_ISIN_B = 11
-
- Global Const NOT_REGISTERED = 20
- Global Const NO_REGINFO = 21
- Global Const NO_SERNUMBER = 22
- Global Const FEATURES_NOT_AVAILABLE = 23
- Global Const WRONG_CODE = 24
-
- Global Const IS_REGISTERED = 748
-
- '--------------------------------------------------------------------------------
- ' these function definitions are for the developer version using cprot20d.dll
- '--------------------------------------------------------------------------------
- Declare Function cpMakeRegCode Lib "cprot20d.dll" (ByVal accesscode%, ByVal serialnum$, ByVal regcode$) As Integer
- Declare Function cpCFGMake Lib "cprot20d.dll" (ByVal path$, ByVal magic&, ByVal filever&) As Integer
- Declare Function cpGetSernum Lib "cprot20d.dll" (ByVal path$, ByVal serialnum$) As Integer
- Declare Function cpRegisterProgram Lib "cprot20d.dll" (ByVal path$, ByVal regcode$) As Integer
- Declare Function cpCheckRegCode Lib "cprot20d.dll" (ByVal path$, ByVal regcode$) As Integer
- Declare Function cpGetRegisteredName Lib "cprot20d.dll" (ByVal path$, ByVal uname$) As Integer
- Declare Function cpGetRegisteredCompany Lib "cprot20d.dll" (ByVal path$, ByVal company$) As Integer
- Declare Function cpSetRegisteredNames Lib "cprot20d.dll" (ByVal path$, ByVal uname$, ByVal company$) As Integer
- Declare Function cpIsRegistered Lib "cprot20d.dll" (ByVal path$) As Integer
- Declare Function cpGetUParams Lib "cprot20d.dll" (ByVal path$, lparam&, iparam1%, iparam2%, iparam3%, iparam4%, iparam5%) As Integer
- Declare Function cpSetUParams Lib "cprot20d.dll" (ByVal path$, ByVal lparam&, ByVal iparam1%, ByVal iparam2%, ByVal iparam3%, ByVal iparam4%, ByVal iparam5%) As Integer
- Declare Function cpSetFTime Lib "cprot20d.dll" (ByVal path$, ByVal fdate&, ByVal ftime%) As Integer
- Declare Function cpWhichDrive Lib "cprot20d.dll" (ByVal file$) As Integer
- Declare Function cpDirRemove Lib "cprot20d.dll" (ByVal path$) As Integer
- Declare Function cpStartProgram Lib "cprot20d.dll" (ByVal path$) As Integer
- Declare Function cpEndProgram Lib "cprot20d.dll" (ByVal path$) As Integer
- Declare Function cpGetUStatistics Lib "cprot20d.dll" (ByVal path$, utimes%, totalhour%, totalmin%, totalsec%, lasthour%, lastMin%, lastsec%) As Integer
- Declare Function cpGetFileinfo Lib "cprot20d.dll" (ByVal path$, version&) As Long
-
-
- '--------------------------------------------------------------------------------
- ' these function definitions are for the user version using cprot20u.dll
- '--------------------------------------------------------------------------------
- 'Declare Function cpCFGMake Lib "cprot20u.dll" (ByVal path$, ByVal magic&, ByVal filever&) As Integer
- 'Declare Function cpGetSernum Lib "cprot20u.dll" (ByVal path$, ByVal serialnum$) As Integer
- 'Declare Function cpRegisterProgram Lib "cprot20u.dll" (ByVal path$, ByVal regcode$) As Integer
- 'Declare Function cpCheckRegCode Lib "cprot20u.dll" (ByVal path$, ByVal regcode$) As Integer
- 'Declare Function cpGetRegisteredName Lib "cprot20u.dll" (ByVal path$, ByVal uname$) As Integer
- 'Declare Function cpGetRegisteredCompany Lib "cprot20u.dll" (ByVal path$, ByVal company$) As Integer
- 'Declare Function cpSetRegisteredNames Lib "cprot20u.dll" (ByVal path$, ByVal uname$, ByVal company$) As Integer
- 'Declare Function cpIsRegistered Lib "cprot20u.dll" (ByVal path$) As Integer
- 'Declare Function cpGetUParams Lib "cprot20u.dll" (ByVal path$, lparam&, iparam1%, iparam2%, iparam3%, iparam4%, iparam5%) As Integer
- 'Declare Function cpSetUParams Lib "cprot20u.dll" (ByVal path$, ByVal lparam&, ByVal iparam1%, ByVal iparam2%, ByVal iparam3%, ByVal iparam4%, ByVal iparam5%) As Integer
- 'Declare Function cpSetFTime Lib "cprot20u.dll" (ByVal path$, ByVal fdate&, ByVal ftime%) As Integer
- 'Declare Function cpWhichDrive Lib "cprot20u.dll" (ByVal file$) As Integer
- 'Declare Function cpDirRemove Lib "cprot20u.dll" (ByVal path$) As Integer
- 'Declare Function cpStartProgram Lib "cprot20u.dll" (ByVal path$) As Integer
- 'Declare Function cpEndProgram Lib "cprot20u.dll" (ByVal path$) As Integer
- 'Declare Function cpGetUStatistics Lib "cprot20u.dll" (ByVal path$, utimes%, totalhour%, totalmin%, totalsec%, lasthour%, lastMin%, lastsec%) As Integer
- 'Declare Function cpGetFileinfo Lib "cprot20u.dll" (ByVal path$, version&) As Long
-
- '------------------------------------------------------------------------------
- ' some parameters for this specifik program
- '------------------------------------------------------------------------------
- Global Const magicnumber = &H54534554
- Global Const fileversion = 1
- Global fileisok
-